﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ArtemisExtensions
{
    public struct CombatantInitiativePair:System.IComparable<CombatantInitiativePair>, System.Collections.Generic.IComparer<CombatantInitiativePair>
    {
        public int InitiativeRoll
        {
            get;
            set;
        }

        public IEntity IEntity
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {
            }
        }

        public int CompareTo(CombatantInitiativePair obj)
        {
            if (obj.InitiativeRoll > this.InitiativeRoll)
            {
                return -1;
            }
            else if (obj.InitiativeRoll < this.InitiativeRoll)
            {
                return 1;
            }
            else
            {
                return 0;
            }

        }

        public int Compare(CombatantInitiativePair x, CombatantInitiativePair y)
        {
            return x.CompareTo(y);
        }
    }
}
